#!/usr/bin/env bash
# extracting command line options as parameters

# 选项是跟在单破折线后面的单个字母，它能改变命令的行为

# 用 case 语句来判断某个参数是否为选项

#./test16.sh -c -a -b -d

echo
while [ -n "$1" ]; do
    case $1 in
    -a) echo "Found the -a option";;
    -b) echo "Found the -b option";;
    -c) echo "Found the -c option";;
    *) echo "$1 is not a option";;
	esac
	shift
done